/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.gap.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author Mrs Yun KZ
 */
@Entity
@Table(name = "gap_master_sex")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "GapMasterSex.findAll", query = "SELECT g FROM GapMasterSex g"),
    @NamedQuery(name = "GapMasterSex.findBySexId", query = "SELECT g FROM GapMasterSex g WHERE g.sexId = :sexId"),
    @NamedQuery(name = "GapMasterSex.findBySexName", query = "SELECT g FROM GapMasterSex g WHERE g.sexName = :sexName")})
public class GapMasterSex implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "sex_id")
    private String sexId;
    @Column(name = "sex_name")
    private String sexName;
    @Lob
    @Column(name = "sex_description")
    private String sexDescription;

    public GapMasterSex() {
    }

    public GapMasterSex(String sexId) {
        this.sexId = sexId;
    }

    public String getSexId() {
        return sexId;
    }

    public void setSexId(String sexId) {
        this.sexId = sexId;
    }

    public String getSexName() {
        return sexName;
    }

    public void setSexName(String sexName) {
        this.sexName = sexName;
    }

    public String getSexDescription() {
        return sexDescription;
    }

    public void setSexDescription(String sexDescription) {
        this.sexDescription = sexDescription;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (sexId != null ? sexId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof GapMasterSex)) {
            return false;
        }
        GapMasterSex other = (GapMasterSex) object;
        if ((this.sexId == null && other.sexId != null) || (this.sexId != null && !this.sexId.equals(other.sexId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return sexName;
//        return "com.gap.entities.GapMasterSex[ sexId=" + sexId + " ]";
    }
    
}
